package com.question.service;

import com.question.pojo.entity.Category;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

public interface CategoryService {
    List<Category> getAllCategories();

    Category getCategoryById(Integer categoryId);

    @Transactional
    void addCategory(Category category);

    @Transactional
    void updateCategory(Category category);

    List<Category> getCategoriesByMajorId(Integer majorId);

    @Transactional
    void deleteCategory(Integer categoryId);

    int countQuestionsByCategory(Integer categoryId);

    int countCategoriesByMajor(Integer majorId);
}